<%-- 
    Document   : add
    Created on : 16-dic-2011, 9.19.42
    Author     : Admin
--%>

<%@page import="entity.Book"%>
<%@page import="entity.Shelf"%>
<%@page import="java.util.List"%>

<%
    List<Shelf> shelves = (List<Shelf>) request.getAttribute("shelves");
%>
<%
    List<Book> books = (List<Book>) request.getAttribute("books");
    int nBooks = books.size();
%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Books (<%= nBooks %>):</h1>
        <ul>
        <%
            
            for(Book b: books){
        %>
                <li> <em><%= b.getAuthor()%></em>, <%= b.getName() %> </li>
        <% 
            }
        %>
        </ul>
        <a href="index.jsp">Back to index </a>
    </body>
</html>
